/**
 * Created by beck on 2015/8/24.
 */
$(document).ready(function(){
    var $token = window.localStorage.getItem("token");
    var $mid = window.localStorage.getItem("mid");
    var $groupid = window.localStorage.getItem("groupId");
    var Post = "mid="+$mid+"&groupid="+$groupid+"&pagesize=10&token="+$token+"&did=77777";
    $.ajax({
        url:'../api/group/getgroupecprodinfolist',
        type:'post',
        data:Post,
        success:function(msg){
        	if(msg.code == 100){
        		var $div = document.getElementById("classify");
        		for (var i = 0; i < msg.data.length; i++) {
					var $p = document.createElement("p");
					var $ul = document.createElement("ul");
					$.id = msg.data[i].n0;
					$p.innerHTML =msg.data[i].n1;
					for (var j = 0; j < msg.data[i].n4.length; j++) {
						var $li = document.createElement("li");
						$li.innerHTML = '<a href=""><img alt="" src="'+
						msg.data[i].n4[j].n3+'"><span>'+
						msg.data[i].n4[j].n1+'</span></a>';
						$($ul).append($li);
					}
					$($div).append($p);
					$($div).append($ul);
				}
        	}
        }
    });
});